package com.mvp.shq.washer.ui.shop.order.ordersubmit;

import com.mvp.shq.washer.base.BaseModel;
import com.mvp.shq.washer.base.BasePresenter;
import com.mvp.shq.washer.base.BaseView;
import com.mvp.shq.washer.entity.result.BaseResult;
import com.mvp.shq.washer.entity.shop.AddressData;
import com.mvp.shq.washer.entity.shop.TotalOrderData;
import com.mvp.shq.washer.entity.shop.result.OrderDataResult;
import com.mvp.shq.washer.entity.shop.result.OrderResult;

import io.reactivex.Observable;


/**
 * Created by westing on 2017/10/11.
 */

public interface OrderSumbitConstract {
    interface Model extends BaseModel{
        Observable<BaseResult<AddressData>> getDefaultAddress (String token, String userId);
        Observable<BaseResult<OrderDataResult>> createOrder(String token, TotalOrderData ecTotalOrderDto);
    }
    interface View extends BaseView{
        void getDefaultAddress(AddressData addressData);
        void createOrder(OrderDataResult orderResult);
    }
    abstract class Presenter extends BasePresenter<Model,View>{
        abstract void getDefAddress();
        abstract void createOrder(TotalOrderData ecTotalOrderDto);
    }
}
